package com.zsf.pojo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

//等价于<bean id="user" class="com.zsf.pojo.User"/>
//Component 组件 要是复杂还是建议用配置文件
@Component
@Scope("singleton")
public class User {
    //相当于<property name="name" value="beisheng"/>
    @Value("beisheng")
    public String name;
}
